package com.tanglongan.designPattern.dp08_composite.demo02;

public class Client {


    public static void main(String[] args) {
        System.out.println("====================安全组合模式===========================");

        File qq = new File("QQ.exe");
        File wx = new File("WeChat.exe");

        Folder office = new Folder("办公软件", 2);
        File ppt = new File("ppt.exe");
        File word = new File("word.exe");
        File excel = new File("excel.exe");
        office.add(ppt);
        office.add(word);
        office.add(excel);

        Folder wps = new Folder("金山WPS软件", 3);
        wps.add(new File("wps.exe"));
        office.add(wps);

        Folder root = new Folder("根目录", 1);
        root.add(qq);
        root.add(wx);
        root.add(office);

        System.out.println("====================show()方法的效果========================");
        root.show();

        System.out.println("====================list()方法的效果========================");
        root.list();

    }
}
